%code %include storeddata.inc %/include %include resulttable.inc %/include function LastUsedProps: WideString; const cCount = 50; var AProps: TCatalogItemProps; ADs: TDBXOMClientDataSet; i: Integer; begin result := toWideString(''); result := result + '
'; result := result + '
'; result := result + '  Last used catalog labels'; result := result + '
'; AProps := TCatalogItemProps.Create(TCatalogItemProp, ''); ADs := catalog.NewDataSet; if Catalog.IsSqlServer then ADs.CommandText := 'select top ' + IntToStr(cCount) +' * from idProp where Propvalue <> ''A'' order by idCreated desc' else ADs.CommandText := 'select * from idProp where Propvalue <> ''A'' order by idCreated desc limit ' + IntToStr(cCount) + ''; ADs.Open; AProps.AddDataSet (ADs); ADs.Close; ADs.Free; Catalog.PathNameForProps (AProps, ' :: ', False); Randomize; for i := 0 to AProps.Count - 1 do begin result := result + ''; result := result + iif(i = 0, '', ', ') + '' + AProps.Items[i].PropName + ''; result := result + ''; end; AProps.Free; result := result + '
'; end; function LastComments; var AItems: TCatalogItems; begin result := toWideString(''); if not FindStoredData ('dsLASTCOMMENTS', AItems, False) then begin AItems := TCatalogItems.Create (TCatalogItem, ''); StoreData ('dsLASTCOMMENTS', AItems); end; AItems.Clear; if Catalog.EnumCommentedItems (AItems, 14) then begin AItems.Name := IntToStr(AItems.Count) + ' Last Commented Images'; result := result + '
'; result := result + IncludeResultTable (AItems, 'dsLASTCOMMENTS', 1, AItems.Count, 80); result := result + '
'; end; end; begin result := toWideString(''); result := result + '

' + LastComments + '

'; result := result + '

' + LastUsedProps + '

'; end; %/code